/**
 * Created by wenchuan.li on 2019/8/08 10:12.
 */
define(function () {

    var self,
        app = win.app,
        pageParameters,
        imgs = {
            imgs: [],
            showIndex: 0
        }
    ;

    var PreviewImages = app.Module.extend({

        init: function () {
            self = this;
            self._super({
                _readyBefore: function () {
                    pageParameters = self._pageParameters;
                    imgs.imgs.pushArray(pageParameters.imgs);
                    imgs.showIndex = pageParameters.showIndex;
                }
            }, win);
        },
        _lazy: function () {
            this._super();

        },
        _ready: function () {
            new Vue({
                el: doc.getElementById('mui-slider-group'),
                data: imgs,
                mounted: function () {
                    require(['muipreviewimageNew'], function () {
                        mui.previewImageNew({
                            imgs: imgs.imgs,
                            openIndex: imgs.showIndex
                        });
                    });
                },
                methods: {}
            });
        }
    });

    new PreviewImages();

});